#!/usr/bin/env python
#-*- coding:utf-8 -*-

import time
import os

'''
flask server configuration
'''
#host = '127.0.0.1' # locally visible
host = '0.0.0.0' # externally visible
port = 5000
debug = False

'''
notepath - path, where the notes are stored
Make sure it has write permissions for the user that runs this app. Notes will
get 666 permissions. It HAS TO BE absolute!
'''
# notepath = /path/to/notes
notepath = os.path.join(os.path.dirname(__file__), 'notes')

'''
noteext - extension for the note files
If this is an empty string, all files in the note directory will be notes.
'''
noteext = '.note'

'''
notename - default name of a newly created note without extension
Unfortunatly there is no counter variable. You have to use some kind of time
output in order to prevent that newly created notes are overwritten.
'''
def notename():
    #return str(int(time.time())) # for a POSIX timestamp
    #return 'prefix_%s' % str(int(time.time())) # same but with prefix
    return time.strftime('%Y-%m-%d_%H-%M-%S')
